package com.ccc.scala.base7_collection

import scala.collection.mutable.ArrayBuffer


object Collection06_Filter {
  def main(args: Array[String]): Unit = {
    // 集合 - filter
    val array = ArrayBuffer(1, 2, 3, 4, 5)

    println(array.filter(num => {
      num % 2 != 0
    })) // ArrayBuffer(1, 3, 5)


  }

}
